how to deploy v2ray client with helm on k8s

kubectl create configmap v2ray --from-file=/etc/v2ray/config.json

helm create v2ray
cd v2ray/

edit values.yaml, change image and service.

image:
  repository: v2ray/official
  tag: latest
  pullPolicy: IfNotPresent

service:
  type: NodePort
  port: 1080

edit templates/deployment.yaml, change containerPort, add volumes and remove probe.

  volumeMounts:
  - name: v2ray
    mountPath: /etc/v2ray/config.json
    subPath: config.json

  ports:
    - name: v2ray
      containerPort: 1080
      protocol: TCP

volumes:
- name: v2ray
  configMap:
    name: v2ray

edit templates/service.yaml, add nodePort.

  ports:
    - port: {{ .Values.service.port }}
      targetPort: 1080
      nodePort: 50000
      protocol: TCP
      name: v2ray

helm install .

now, you can use proxifier to connect to your v2ray client.

you can also download this chart, but don’t forget to create configmap.